package com.li.day.day16;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.File;
import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
        Friend friend = new Friend("张三",88);
        ObjectMapper ma = new ObjectMapper();
        ma.writeValue(new File("D:\\Sell.txt"),friend);
        System.out.println("寂寞");
        Friend f = ma.readValue(new File("D:\\Sell.txt"), Friend.class);
        System.out.println(f);
    }
}
